<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Db;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }

    public function aa(){
        $create_vote = Db::name('create_vote')->select();

        foreach ($create_vote as $k=>$v){
            Db::name('create_vote')->where(array('id'=>$v['id']))->setField('share_title',$v['title']);
        }
        echo 'ok';
    }
}
